/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-20 16:22:23
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-20 16:31:27
 */
class GradeAttendanceModel {
  int late;
  int missing;
  int leave;
  List<Persons> persons;

  GradeAttendanceModel({this.late, this.missing, this.leave, this.persons});

  GradeAttendanceModel.fromJson(Map<String, dynamic> json) {
    late = json['late'];
    missing = json['missing'];
    leave = json['leave'];
    if (json['persons'] != null) {
      persons = new List<Persons>();
      json['persons'].forEach((v) {
        persons.add(new Persons.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['late'] = this.late;
    data['missing'] = this.missing;
    data['leave'] = this.leave;
    if (this.persons != null) {
      data['persons'] = this.persons.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Persons {
  String name;
  String time;
  String avatar;
  String status;

  Persons({this.name, this.time, this.avatar, this.status});

  Persons.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    time = json['time'];
    avatar = json['avatar'];
    status = json['status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['time'] = this.time;
    data['avatar'] = this.avatar;
    data['status'] = this.status;
    return data;
  }
}
